//二叉树中序遍历的递归实现

class Solution
{
public:
    vector<int> res;

    vector<int> inorderTraversal(TreeNode *root)
    {
        inOrder(root);
        return res;
    }

    void inOrder(TreeNode *root)
    {
        if (root != NULL)
        {
            inOrder(root->left);
            res.push_back(root->val);
            inOrder(root->right);
        }
    }
};